﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SZEWAlignmentUtilExample
{
    public partial class IDInputForm : Form
    {
        public DialogResult result = DialogResult.None;
        public IDInputForm()
        {
            InitializeComponent();
        }

        private void button_OK_Click(object sender, EventArgs e)
        {
            result = DialogResult.OK;
            this.Close();
        }

        public bool GetId(ref long id)
        {
            if (string.IsNullOrEmpty(textBox1.Text))
                return false;

            try
            {
                id = Convert.ToInt64(textBox1.Text);
            }
            catch
            {
                return false;
            }


            return true;
        }
    }
}
